/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package LDVH.ihm;

/**
 *
 * @author daniele
 */
public class ObjetLister {
    private final Integer id;
    private final String desc;
    
    public ObjetLister(Integer id, String desc) {
        this.id = id;
        this.desc = desc;
    }

    /**
     * @return the id
     */
    public Integer getId() {
        return id;
    }

    /**
     * @return the desc
     */
    public String getDesc() {
        return desc;
    }
    
    @Override
    public String toString() {
        return this.desc;
    }
    
    @Override
    public boolean equals(Object o) {
        if ( ! (o instanceof ObjetLister))
            return false;
        ObjetLister ol = (ObjetLister)o;
        
        return ol.getId().equals(id) && ol.getDesc().equals(desc);
    }
}
